package com.itheima.utils;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

//注入到spring容器中
@Component
public class TimeUtil {
    //@Scheduled(fixedRate = 5000,initialDelay = 5000)
    @Scheduled(cron="*/5 * * * * *")
    public void task01(){
        System.out.println(LocalDateTime.now());
    }
}
